<include file="Common/index_header-new" />
<link rel="stylesheet" href="__PUBLIC__/home/v2/css/payment.css">

<div class="main-body">
	<div class="container">
		<div class="payment-details ">
			<div class="col-xs-12 col-md-4 payment-order _order_info_data" data-order-id="{$info['order_id']}" data-pay-price="{$info['amount']}">订单：{$info['report_title']}</div>
			<div class="col-xs-12 col-md-4 payment-amount">套餐：¥{$info['amount']}</div>
			<div class="col-xs-12 col-md-4 payment-number">应付金额：<span class="_paMoney">¥{$info['amount']}</span></div>
		</div>
		<div style="padding:5% 0 10% 0;">
			<div class="payment-choice-title">选择支付方式</div>
			<div class="payment-choice">
				<div class="title-choice"></div>
				<a class="active zfb"><img src="__PUBLIC__/home/v2/images/zfb.png" /></a>
				<a class="wx"><img src="__PUBLIC__/home/v2/images/wx.png" /></a>
			</div>
			<a class="btn btn-primary btn-routine payment-yes _pay_keeppay_rePay" href="javascript:void(0);">前去支付</a>
		</div>
	</div>
</div>

<include file="Common/index_footer-new" />
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
	$('.zfb,.wx').click(function() {
			$('.zfb,.wx').removeClass('active');
			$(this).addClass('active');
		})
		//重新支付
	$('._pay_keeppay_rePay').click(function() {

		//1 = 支付宝； 2 = 微信支付
		var repay_data = {};
		repay_data.platform = ($('.zfb.active')[0] && 1) || ($('.wx.active')[0] && 2);
		repay_data.order_id = $('._order_info_data').attr('data-order-id');
		for(var k in repay_data) {
			if(!repay_data[k]) {
				toastr.error('该页面已过期', null, opts);
				return;
			}
		}
		$formSubmit({
			url: '/payreport/repay.html',
			type: 'post',
			data: repay_data
		});
	});

	function $formSubmit(data) {
		var formInnHTML = ['<form style="display:none" action="' + (data.url || '#') + '" method="' + (data.type || 'post') + '">']
		for(var k in data.data) {
			formInnHTML.push('<input type="text" name="' + k + '" value="' + data.data[k] + '" />');
		}
		formInnHTML.push('<input type="submit" /></form>');
		var submitFrom = $(formInnHTML.join(''))[0];
		$('body').append(submitFrom);
		submitFrom.submit();
	}
</script>
</body>

</html>